<?php
$this->breadcrumbs = array(
    'Galleries' => array('index'),
);
if (!is_null($model)) :
    if ($model->id)
        $this->breadcrumbs = CMap::mergeArray($this->breadcrumbs, array($model->name => array('update', 'id' => $model->id), 'Update'));
    else
        $this->breadcrumbs[] = 'Create';

    $this->menu = array(
    );
?>

    <h1><?php echo $model->id ? 'Edit' : 'Create new';?> Gallery </h1>

    <?php echo $this->renderPartial('_form', array('model' => $model, 'photos' => $photos)); ?>
<?php else : ?>
    <p>This gallery is not found.</p>
<?php endif; ?>